﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace oqis.gis.frame
{
    public partial class FormSetLayerProperty : Form
    {
        #region 类成员变量

      // private DevExpress.XtraTreeList.Nodes.TreeListNode _currentNode = null;
        
        #endregion

        #region 类构建与初始化

        /// <summary>
        /// 类构建
        /// </summary>
        /// <param name="node"></param>
        public FormSetLayerProperty(DevExpress.XtraTreeList.Nodes.TreeListNode node)
        {
            InitializeComponent();

            _currentNode = node;
            this.textLayerName.Text = node[0].ToString();
        }

        #endregion


        #region Form事件

        /// <summary>
        /// 取消
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        /// <summary>
        /// 确定
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnOK_Click(object sender, EventArgs e)
        {
            btnUse_Click(sender, e);
            this.DialogResult= DialogResult.OK;
        }

        /// <summary>
        /// 应用
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnUse_Click(object sender, EventArgs e)
        {
            _currentNode[0] = this.textLayerName.Text;
        }

        #endregion
    }
}
